Optimal. Leaf size=316 \[ \frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (48 c^2 \left (a^2 f^2+4 a b e f+b^2 \left (2 d f+e^2\right )\right )-40 b^2 c f (3 a f+2 b e)-64 c^3 \left (a \left (2 d f+e^2\right )+2 b d e\right )+35 b^4 f^2+128 c^4 d^2\right )}{128 c^{9/2}}+\frac {\sqrt {a+b x+c x^2} \left (-16 c^2 \left (16 a e f+9 b \left (2 d f+e^2\right )\right )+20 b c f (11 a f+12 b e)-105 b^3 f^2+384 c^3 d e\right )}{192 c^4}+\frac {x \sqrt {a+b x+c x^2} \left (-4 c f (9 a f+20 b e)+35 b^2 f^2+48 c^2 \left (2 d f+e^2\right )\right )}{96 c^3}+\frac {f x^2 \sqrt {a+b x+c x^2} (16 c e-7 b f)}{24 c^2}+\frac {f^2 x^3 \sqrt {a+b x+c x^2}}{4 c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.63, antiderivative size = 316, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {1661, 640, 621, 206} \[ \frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (48 c^2 \left (a^2 f^2+4 a b e f+b^2 \left (2 d f+e^2\right )\right )-40 b^2 c f (3 a f+2 b e)-64 c^3 \left (a \left (2 d f+e^2\right )+2 b d e\right )+35 b^4 f^2+128 c^4 d^2\right )}{128 c^{9/2}}+\frac {x \sqrt {a+b x+c x^2} \left (-4 c f (9 a f+20 b e)+35 b^2 f^2+48 c^2 \left (2 d f+e^2\right )\right )}{96 c^3}+\frac {\sqrt {a+b x+c x^2} \left (-16 c^2 \left (16 a e f+9 b \left (2 d f+e^2\right )\right )+20 b c f (11 a f+12 b e)-105 b^3 f^2+384 c^3 d e\right )}{192 c^4}+\frac {f x^2 \sqrt {a+b x+c x^2} (16 c e-7 b f)}{24 c^2}+\frac {f^2 x^3 \sqrt {a+b x+c x^2}}{4 c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 621
Rule 640
Rule 1661
Rubi steps
\begin {align*} \int \frac {\left (d+e x+f x^2\right )^2}{\sqrt {a+b x+c x^2}} \, dx &=\frac {f^2 x^3 \sqrt {a+b x+c x^2}}{4 c}+\frac {\int \frac {4 c d^2+8 c d e x-\left (3 a f^2-4 c \left (e^2+2 d f\right )\right ) x^2+\frac {1}{2} f (16 c e-7 b f) x^3}{\sqrt {a+b x+c x^2}} \, dx}{4 c}\\ &=\frac {f (16 c e-7 b f) x^2 \sqrt {a+b x+c x^2}}{24 c^2}+\frac {f^2 x^3 \sqrt {a+b x+c x^2}}{4 c}+\frac {\int \frac {12 c^2 d^2+\left (24 c^2 d e-16 a c e f+7 a b f^2\right ) x+\frac {1}{4} \left (35 b^2 f^2-4 c f (20 b e+9 a f)+48 c^2 \left (e^2+2 d f\right )\right ) x^2}{\sqrt {a+b x+c x^2}} \, dx}{12 c^2}\\ &=\frac {\left (35 b^2 f^2-4 c f (20 b e+9 a f)+48 c^2 \left (e^2+2 d f\right )\right ) x \sqrt {a+b x+c x^2}}{96 c^3}+\frac {f (16 c e-7 b f) x^2 \sqrt {a+b x+c x^2}}{24 c^2}+\frac {f^2 x^3 \sqrt {a+b x+c x^2}}{4 c}+\frac {\int \frac {\frac {1}{4} \left (96 c^3 d^2-35 a b^2 f^2+4 a c f (20 b e+9 a f)-48 a c^2 \left (e^2+2 d f\right )\right )+\frac {1}{8} \left (384 c^3 d e-105 b^3 f^2+20 b c f (12 b e+11 a f)-16 c^2 \left (16 a e f+9 b \left (e^2+2 d f\right )\right )\right ) x}{\sqrt {a+b x+c x^2}} \, dx}{24 c^3}\\ &=\frac {\left (384 c^3 d e-105 b^3 f^2+20 b c f (12 b e+11 a f)-16 c^2 \left (16 a e f+9 b \left (e^2+2 d f\right )\right )\right ) \sqrt {a+b x+c x^2}}{192 c^4}+\frac {\left (35 b^2 f^2-4 c f (20 b e+9 a f)+48 c^2 \left (e^2+2 d f\right )\right ) x \sqrt {a+b x+c x^2}}{96 c^3}+\frac {f (16 c e-7 b f) x^2 \sqrt {a+b x+c x^2}}{24 c^2}+\frac {f^2 x^3 \sqrt {a+b x+c x^2}}{4 c}+\frac {\left (128 c^4 d^2+35 b^4 f^2-40 b^2 c f (2 b e+3 a f)-64 c^3 \left (2 b d e+a \left (e^2+2 d f\right )\right )+48 c^2 \left (4 a b e f+a^2 f^2+b^2 \left (e^2+2 d f\right )\right )\right ) \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{128 c^4}\\ &=\frac {\left (384 c^3 d e-105 b^3 f^2+20 b c f (12 b e+11 a f)-16 c^2 \left (16 a e f+9 b \left (e^2+2 d f\right )\right )\right ) \sqrt {a+b x+c x^2}}{192 c^4}+\frac {\left (35 b^2 f^2-4 c f (20 b e+9 a f)+48 c^2 \left (e^2+2 d f\right )\right ) x \sqrt {a+b x+c x^2}}{96 c^3}+\frac {f (16 c e-7 b f) x^2 \sqrt {a+b x+c x^2}}{24 c^2}+\frac {f^2 x^3 \sqrt {a+b x+c x^2}}{4 c}+\frac {\left (128 c^4 d^2+35 b^4 f^2-40 b^2 c f (2 b e+3 a f)-64 c^3 \left (2 b d e+a \left (e^2+2 d f\right )\right )+48 c^2 \left (4 a b e f+a^2 f^2+b^2 \left (e^2+2 d f\right )\right )\right ) \operatorname {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{64 c^4}\\ &=\frac {\left (384 c^3 d e-105 b^3 f^2+20 b c f (12 b e+11 a f)-16 c^2 \left (16 a e f+9 b \left (e^2+2 d f\right )\right )\right ) \sqrt {a+b x+c x^2}}{192 c^4}+\frac {\left (35 b^2 f^2-4 c f (20 b e+9 a f)+48 c^2 \left (e^2+2 d f\right )\right ) x \sqrt {a+b x+c x^2}}{96 c^3}+\frac {f (16 c e-7 b f) x^2 \sqrt {a+b x+c x^2}}{24 c^2}+\frac {f^2 x^3 \sqrt {a+b x+c x^2}}{4 c}+\frac {\left (128 c^4 d^2+35 b^4 f^2-40 b^2 c f (2 b e+3 a f)-64 c^3 \left (2 b d e+a \left (e^2+2 d f\right )\right )+48 c^2 \left (4 a b e f+a^2 f^2+b^2 \left (e^2+2 d f\right )\right )\right ) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{128 c^{9/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.50, size = 251, normalized size = 0.79 \[ \frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+x (b+c x)}}\right ) \left (48 c^2 \left (a^2 f^2+4 a b e f+b^2 \left (2 d f+e^2\right )\right )-40 b^2 c f (3 a f+2 b e)-64 c^3 \left (a \left (2 d f+e^2\right )+2 b d e\right )+35 b^4 f^2+128 c^4 d^2\right )}{128 c^{9/2}}+\frac {\sqrt {a+x (b+c x)} \left (-8 c^2 \left (a f (32 e+9 f x)+b \left (36 d f+18 e^2+20 e f x+7 f^2 x^2\right )\right )+10 b c f (22 a f+24 b e+7 b f x)-105 b^3 f^2+16 c^3 \left (12 d (2 e+f x)+x \left (6 e^2+8 e f x+3 f^2 x^2\right )\right )\right )}{192 c^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.44, size = 637, normalized size = 2.02 \[ \left [\frac {3 \, {\left (128 \, c^{4} d^{2} - 128 \, b c^{3} d e + 16 \, {\left (3 \, b^{2} c^{2} - 4 \, a c^{3}\right )} e^{2} + {\left (35 \, b^{4} - 120 \, a b^{2} c + 48 \, a^{2} c^{2}\right )} f^{2} + 16 \, {\left (2 \, {\left (3 \, b^{2} c^{2} - 4 \, a c^{3}\right )} d - {\left (5 \, b^{3} c - 12 \, a b c^{2}\right )} e\right )} f\right )} \sqrt {c} \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} - 4 \, \sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {c} - 4 \, a c\right ) + 4 \, {\left (48 \, c^{4} f^{2} x^{3} + 384 \, c^{4} d e - 144 \, b c^{3} e^{2} - 5 \, {\left (21 \, b^{3} c - 44 \, a b c^{2}\right )} f^{2} + 8 \, {\left (16 \, c^{4} e f - 7 \, b c^{3} f^{2}\right )} x^{2} - 16 \, {\left (18 \, b c^{3} d - {\left (15 \, b^{2} c^{2} - 16 \, a c^{3}\right )} e\right )} f + 2 \, {\left (48 \, c^{4} e^{2} + {\left (35 \, b^{2} c^{2} - 36 \, a c^{3}\right )} f^{2} + 16 \, {\left (6 \, c^{4} d - 5 \, b c^{3} e\right )} f\right )} x\right )} \sqrt {c x^{2} + b x + a}}{768 \, c^{5}}, -\frac {3 \, {\left (128 \, c^{4} d^{2} - 128 \, b c^{3} d e + 16 \, {\left (3 \, b^{2} c^{2} - 4 \, a c^{3}\right )} e^{2} + {\left (35 \, b^{4} - 120 \, a b^{2} c + 48 \, a^{2} c^{2}\right )} f^{2} + 16 \, {\left (2 \, {\left (3 \, b^{2} c^{2} - 4 \, a c^{3}\right )} d - {\left (5 \, b^{3} c - 12 \, a b c^{2}\right )} e\right )} f\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {-c}}{2 \, {\left (c^{2} x^{2} + b c x + a c\right )}}\right ) - 2 \, {\left (48 \, c^{4} f^{2} x^{3} + 384 \, c^{4} d e - 144 \, b c^{3} e^{2} - 5 \, {\left (21 \, b^{3} c - 44 \, a b c^{2}\right )} f^{2} + 8 \, {\left (16 \, c^{4} e f - 7 \, b c^{3} f^{2}\right )} x^{2} - 16 \, {\left (18 \, b c^{3} d - {\left (15 \, b^{2} c^{2} - 16 \, a c^{3}\right )} e\right )} f + 2 \, {\left (48 \, c^{4} e^{2} + {\left (35 \, b^{2} c^{2} - 36 \, a c^{3}\right )} f^{2} + 16 \, {\left (6 \, c^{4} d - 5 \, b c^{3} e\right )} f\right )} x\right )} \sqrt {c x^{2} + b x + a}}{384 \, c^{5}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.63, size = 304, normalized size = 0.96 \[ \frac {1}{192} \, \sqrt {c x^{2} + b x + a} {\left (2 \, {\left (4 \, {\left (\frac {6 \, f^{2} x}{c} - \frac {7 \, b c^{2} f^{2} - 16 \, c^{3} f e}{c^{4}}\right )} x + \frac {96 \, c^{3} d f + 35 \, b^{2} c f^{2} - 36 \, a c^{2} f^{2} - 80 \, b c^{2} f e + 48 \, c^{3} e^{2}}{c^{4}}\right )} x - \frac {288 \, b c^{2} d f + 105 \, b^{3} f^{2} - 220 \, a b c f^{2} - 384 \, c^{3} d e - 240 \, b^{2} c f e + 256 \, a c^{2} f e + 144 \, b c^{2} e^{2}}{c^{4}}\right )} - \frac {{\left (128 \, c^{4} d^{2} + 96 \, b^{2} c^{2} d f - 128 \, a c^{3} d f + 35 \, b^{4} f^{2} - 120 \, a b^{2} c f^{2} + 48 \, a^{2} c^{2} f^{2} - 128 \, b c^{3} d e - 80 \, b^{3} c f e + 192 \, a b c^{2} f e + 48 \, b^{2} c^{2} e^{2} - 64 \, a c^{3} e^{2}\right )} \log \left ({\left | -2 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} \sqrt {c} - b \right |}\right )}{128 \, c^{\frac {9}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 706, normalized size = 2.23 \[ \frac {\sqrt {c \,x^{2}+b x +a}\, f^{2} x^{3}}{4 c}-\frac {7 \sqrt {c \,x^{2}+b x +a}\, b \,f^{2} x^{2}}{24 c^{2}}+\frac {2 \sqrt {c \,x^{2}+b x +a}\, e f \,x^{2}}{3 c}+\frac {3 a^{2} f^{2} \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {5}{2}}}-\frac {15 a \,b^{2} f^{2} \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{16 c^{\frac {7}{2}}}+\frac {3 a b e f \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {5}{2}}}-\frac {a d f \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{c^{\frac {3}{2}}}-\frac {a \,e^{2} \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {3}{2}}}+\frac {35 b^{4} f^{2} \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{128 c^{\frac {9}{2}}}-\frac {5 b^{3} e f \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {7}{2}}}+\frac {3 b^{2} d f \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{4 c^{\frac {5}{2}}}+\frac {3 b^{2} e^{2} \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {5}{2}}}-\frac {b d e \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{c^{\frac {3}{2}}}+\frac {d^{2} \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{\sqrt {c}}-\frac {3 \sqrt {c \,x^{2}+b x +a}\, a \,f^{2} x}{8 c^{2}}+\frac {35 \sqrt {c \,x^{2}+b x +a}\, b^{2} f^{2} x}{96 c^{3}}-\frac {5 \sqrt {c \,x^{2}+b x +a}\, b e f x}{6 c^{2}}+\frac {\sqrt {c \,x^{2}+b x +a}\, d f x}{c}+\frac {\sqrt {c \,x^{2}+b x +a}\, e^{2} x}{2 c}+\frac {55 \sqrt {c \,x^{2}+b x +a}\, a b \,f^{2}}{48 c^{3}}-\frac {4 \sqrt {c \,x^{2}+b x +a}\, a e f}{3 c^{2}}-\frac {35 \sqrt {c \,x^{2}+b x +a}\, b^{3} f^{2}}{64 c^{4}}+\frac {5 \sqrt {c \,x^{2}+b x +a}\, b^{2} e f}{4 c^{3}}-\frac {3 \sqrt {c \,x^{2}+b x +a}\, b d f}{2 c^{2}}-\frac {3 \sqrt {c \,x^{2}+b x +a}\, b \,e^{2}}{4 c^{2}}+\frac {2 \sqrt {c \,x^{2}+b x +a}\, d e}{c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (f\,x^2+e\,x+d\right )}^2}{\sqrt {c\,x^2+b\,x+a}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (d + e x + f x^{2}\right )^{2}}{\sqrt {a + b x + c x^{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________